package de.baumann.browser.api.net

import de.baumann.browser.api.net.base.BaseUrl
import de.baumann.browser.api.net.vo.ExploreMode
import de.baumann.browser.api.net.vo.Result
import io.reactivex.Observable
import retrofit2.http.POST
import de.baumann.browser.BuildConfig
import de.baumann.browser.api.net.vo.explore.OdinDestroyBean
import de.baumann.browser.api.net.vo.explore.OdinDestroyMineTeamBean
import de.baumann.browser.api.net.vo.explore.OtherDestroyBean
import retrofit2.http.Body
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded

@BaseUrl(BuildConfig.API_URL)
interface ExploreApiService {

    @POST("config/awardStimulate/remain")
    fun getExplore(): Observable<Result<ExploreMode>>

    //销毁Odin记录
    @FormUrlEncoded
    @POST(BuildConfig.WALLET_API_URL + "user/power/odin/burn/record")
    fun getExploreOdinDestroy(
            @Field("address") phone: String,
            @Field("params[beginTime]") beginTime: String,
            @Field("params[endTime]") token: String
    ): Observable<Result<List<OdinDestroyBean>>>

    //销毁GUNG记录
    @FormUrlEncoded
    @POST(BuildConfig.FUCK_GG_API + "power/frigGung/burn/record")
    fun getExploreOtherDestroy(
            @Field("fromAddress") phone: String,
            @Field("params[beginTime]") beginTime: String,
            @Field("params[endTime]") token: String
    ): Observable<Result<List<OtherDestroyBean>>>  //销毁GUNG记录

    @FormUrlEncoded
    @POST(BuildConfig.WALLET_API_URL + "user/power/odin/burn/sum")
    fun getExploreOdinSun(
            @Field("address") phone: String,
            @Field("params[beginTime]") beginTime: String,
            @Field("params[endTime]") token: String
    ): Observable<Result<String>>

    @FormUrlEncoded
    @POST(BuildConfig.FUCK_GG_API + "power/frigGung/burn/sum")
    fun getExploreOtherSun(
            @Field("fromAddress") phone: String,
            @Field("params[beginTime]") beginTime: String,
            @Field("params[endTime]") token: String
    ): Observable<Result<String>>


    //销毁Odin记录
    @POST("config/awardStimulate/remain")
    fun getExploreTeamOdinDestroy(): Observable<Result<List<OdinDestroyMineTeamBean>>>

}